<?php echo '<?xml version="1.0" encoding="utf-8" ?>'."\n";?>
<document>
<webSite><?=config_item('base_url')?></webSite>
<webMaster>电影1010</webMaster>
<updatePeri>1800</updatePeri>
<?php foreach ($data as $v):?>
<item>
<title><?=replaces($v['china_name']);?></title>
<link><?=movie_url($v['id']);?></link>
<text><?=trim( preg_replace("/[&|&].*[;|;]/sU", '', strip_tags($v['drama']) ) );?></text>
<image><?=$v['poster_addr'];?></image>
<keywords><?=replaces($v['china_name'].$v['director'].$v['starring'].$v['version'].$v['language']);?></keywords>
<author>电影1010</author>
<source>电影1010</source>
<pubDate><?=date('Y-m-d H:i:s', strtotime($v['update_time']));?></pubDate>
</item>
<?php endforeach;?>
</document>
<?php
function replaces($str)
{
	$str = strip_tags($str);
	$find = array('&nbsp;', '&', '&', ';', ';');
	$replace = array('', '', '', '', '');
	return str_replace($find, $replace, $str);
}
?>